package com.czp.ssm.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


import com.czp.ssm.bean.User;
import com.czp.ssm.service.CompanyService;
import com.czp.ssm.service.UserService;

@Controller
@RequestMapping("/adminController")
public class AdminController {
	
	@Autowired
	private UserService userService;
	@Autowired
	private CompanyService companyService;
	
	
	/**
	 * 企业管理
	 * @return
	 */
	@RequestMapping("/adminInfo")
	public ModelAndView adminInfo() {
		String userId = "0003";
		long id = 3l;
		User user = userService.findUserById(id);
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("user", user);
		modelAndView.setViewName("background/admin/adminInfo");
		return modelAndView;
	}
	
	/**
	 * 企业管理
	 * @return
	 */
	@RequestMapping("/editPassword")
	public String editPassword() {
		return "background/admin/editPassword";
	}
	
	/**
	 * 密码修改
	 * @return
	 */
	@RequestMapping("/doEditPassword")
	public String doEditPassword() {
		return "background/admin/editPassword";
	}
	
}
